#include "sqltask.h"


void login(argument sqlobj){
    cout<<"cmd2sqlfunc: login cmd exe\n";
    thesql* ptr = (thesql* )sqlobj;
    ptr->upsert();
};


void logout(argument sqlobj){
    cout<<"cmd2sqlfunc: logout cmd exe\n";
    thesql* ptr = (thesql* )sqlobj;
};


callback getfunc(thesql* ptr){
    callback func;
    if(ptr->function==string("login")){
        func = login;
    }else if(ptr->function==string("logout")){
        func = logout;
    }
    return func;
};

argument getargu(thesql* ptr){
    argument argu;
    argu = (void *)ptr;
    return argu;
};